/**
 * 媒体logo
 * @param data
 */
export const platformLogo = (platform) =>{
  let platformList = []
  if (platform instanceof Array) {
    platformList = platform
  } else {
    platformList = platform.split(',')
  }
  let logoList = []
  platformList.map(item => {
    switch (item) {
      case 'google':
        logoList.push({name:'google',url:'/img/icon/google-icon.png'});
        return
      case 'facebook':
        logoList.push({name:'facebook',url:'/img/icon/facebook-icon.png'});
        return
      case 'bigo':
        logoList.push({name:'bigo',url:'/img/icon/bigo-icon.png'});
        return
      case 'tiktok':
        logoList.push({name:'tiktok',url:'/img/icon/tiktok-icon.png'});
        return
      case 'kwai':
        logoList.push({name:'kwai',url:'/img/icon/kwai-icon.png'});
        return
      case 'eagllwin':
        logoList.push({name:'eagllwin',url:'/img/icon/eagllwin-icon.png'});
        return
    }
  })

  return logoList
}

export const getTtStatus = () => {
  let campaign = getTtCampaignStatus();
  let adGroup = getTtAdGroupStatus();
  let ad = getTtAdStatus();

  let status = {
    campaign: campaign,
    adGroup: adGroup,
    ad: ad
  }

  return status;
}


export const getTtCampaignStatus = () => {
  let status = [
    //自定义状态
    {index: 0, label: "草稿", key: "0"},
    {index: 1, label: "创建中", key: "1"},
    {index: 2, label: "创建中", key: "2"},
    {index: 3, label: "创建失败", key: "3"},
    {index: 4, label: "投放中", key: "4"},
    {index: 5, label: "已暂停", key: "5"},
    {index: 6, label: "已删除", key: "6"},
    {index: 7, label: "未投放", key: "7"},
    //tt 状态
    {index: 8, label: "已删除", key: "CAMPAIGN_STATUS_DELETE"},
    {index: 9, label: "广告主审核未通过", key: "CAMPAIGN_STATUS_ADVERTISER_AUDIT_DENY"},
    {index: 10, label: "广告主审核中", key: "CAMPAIGN_STATUS_ADVERTISER_AUDIT"},
    {index: 11, label: "广告主合同未生效", key: "ADVERTISER_CONTRACT_PENDING"},
    {index: 12, label: "广告主账号被惩罚", key: "ADVERTISER_ACCOUNT_PUNISH"},
    {index: 13, label: "超出预算", key: "CAMPAIGN_STATUS_BUDGET_EXCEED"},
    {index: 14, label: "暂停", key: "CAMPAIGN_STATUS_DISABLE"},
    {index: 15, label: "投放中", key: "CAMPAIGN_STATUS_ENABLE"},
    {index: 16, label: "所有包含已删除", key: "CAMPAIGN_STATUS_ALL"},
    {index: 17, label: "所有不含已删除", key: "CAMPAIGN_STATUS_NOT_DELETE"}]

  return status;
}


export const getTtAdGroupStatus = () => {
  let status = [
    {index: 0, label: "草稿", key: "0"},
    {index: 1, label: "创建中", key: "1"},
    {index: 2, label: "创建中", key: "2"},
    {index: 3, label: "创建失败", key: "3"},
    {index: 4, label: "投放中", key: "4"},
    {index: 5, label: "已暂停", key: "5"},
    {index: 6, label: "已删除", key: "6"},
    {index: 7, label: "未投放", key: "7"},
    {index: 8, label: "已关闭", key: "8"},
    {index: 9, label: "已完成", key: "9"},

    //tt 状态
    {index: 10, label: "所有含已删除", key: "ADGROUP_STATUS_ALL"},
    {index:11, label: "所有不含已删除", key: "ADGROUP_STATUS_NOT_DELETE"},
    {index: 12, label: "已删除", key: "ADGROUP_STATUS_DELETE"},
    {index: 13, label: "推广系列删除", key: "ADGROUP_STATUS_CAMPAIGN_DELETE"},
    {index: 14, label: "广告主审核未通过", key: "ADGROUP_STATUS_ADVERTISER_AUDIT_DENY"},
    {index: 15, label: "广告主审核中", key: "ADGROUP_STATUS_ADVERTISER_AUDIT"},
    {index: 16, label: "广告主合同未生效", key: "ADVERTISER_CONTRACT_PENDING"},
    {index: 17, label: "广告主账号被惩罚", key: "ADVERTISER_ACCOUNT_PUNISH"},
    {index: 18, label: "推广系列超出预算", key: "ADGROUP_STATUS_CAMPAIGN_EXCEED"},
    {index: 19, label: "广告组超出预算", key: "ADGROUP_STATUS_BUDGET_EXCEED"},
    {index: 20, label: "广告主余额不足", key: "ADGROUP_STATUS_BALANCE_EXCEED"},
    {index: 21, label: "广告组审核拒绝", key: "ADGROUP_STATUS_AUDIT_DENY"},
    {index: 22, label: "修改审核", key: "ADGROUP_STATUS_REAUDIT"},
    {index: 23, label: "新建审核", key: "ADGROUP_STATUS_AUDIT"},
    {index: 24, label: "计划新建", key: "ADGROUP_STATUS_CREATE"},
    {index: 25, label: "广告组被冻结", key: "ADGROUP_STATUS_FROZEN"},
    {index: 26, label: "未到投放时间", key: "ADGROUP_STATUS_NOT_START"},
    {index: 27, label: "已到投放时间但直播未开始", key: "ADGROUP_STATUS_LIVE_NOT_START"},
    {index: 28, label: "已完成", key: "ADGROUP_STATUS_TIME_DONE"},
    {index: 29, label: "推广系列暂停", key: "ADGROUP_STATUS_CAMPAIGN_DISABLE"},
    {index: 30, label: "暂停", key: "ADGROUP_STATUS_DISABLE"},
    {index: 31, label: "投放中", key: "ADGROUP_STATUS_DELIVERY_OK"},
    {index: 32, label: "重新审核中", key: "ADGROUP_STATUS_SHADOW_ADGROUP_REAUDIT"},
    {index: 33, label: "广告组绑定的Pixel已解绑", key: "ADGROUP_STATUS_PIXEL_UNBIND"},
    {index: 34, label: "广告组部分审核中，且不在投放中", key: "ADGROUP_STATUS_PARTIAL_AUDIT_NO_DELIVERY"},
    {index: 35, label: "广告组部分审核中，且在投放中", key: "ADGROUP_STATUS_PARTIAL_AUDIT_DELIVERY_OK"},
    {index: 36, label: "待补充行业资质", key: "ADGROUP_STATUS_INDUSTRY_QUALIFICATION_MISSING"},
    {index: 37, label: "行业资质已过期", key: "ADGROUP_STATUS_INDUSTRY_QUALIFICATION_EXPIRED"},
    {index: 38, label: "行业资质不通过", key: "ADGROUP_STATUS_INDUSTRY_QUALIFICATION_DENY"},
    {index: 39, label: "预扣费失败", key: "ADGROUP_STATUS_RF_DEDUCTION_FAILED"},
    {index: 40, label: "无有效创意", key: "ADGROUP_STATUS_RF_NO_VALID_CREATIVE"},
    {index: 41, label: "广告组已关闭", key: "ADGROUP_STATUS_RF_CLOSED_OTHERS"},
    {index: 42, label: "账户余额不足扣款", key: "ADGROUP_STATUS_RF_SHORT_BALANCE"},
    {index: 43, label: "预算/库存已预定", key: "ADGROUP_STATUS_RF_BOOKING"},
    {index: 44, label: "无创意可投", key: "ADGROUP_STATUS_RF_NO_DELIVERY_CREATIVE"},
    {index: 45, label: "已排期", key: "ADGROUP_STATUS_RF_SCHEDULE"},
    {index: 46, label: "广告组已终止", key: "ADGROUP_STATUS_RF_TERMINATE"},
    {index: 47, label: "R&F广告创意审核未通过", key: "ADGROUP_STATUS_RF_AD_AUDIT_DENY"},
    {index: 48, label: "广告账户无效", key: "ADVERTISER_ACCOUNT_INVALID"},
    {index: 49, label: "R&F广告组不存在或为其他异常状态", key: "ADGROUP_STATUS_RF_ADGROUP_INVALID"},
    {index: 50, label: "R&F推广已撤单", key: "ADGROUP_STATUS_RF_WITHDRAW_ORDER"},
    {index: 51, label: "R&F广告组已完成", key: "ADGROUP_STATUS_RF_TIME_DONE"},
    {index: 52, label: "已到投放时间但直播未开始", key: "ADGROUP_STATUS_LIVE_OFFLINE"}]

  return status;

}


export const getTtAdStatus = () => {
  let status = [
    // 自定义状态
    {index: 0, label: "草稿", key: "0"},
    {index: 1, label: "创建中", key: "1"},
    {index: 2, label: "创建中", key: "2"},
    {index: 3, label: "创建失败", key: "3"},
    {index: 4, label: "投放中", key: "4"},
    {index: 5, label: "已暂停", key: "5"},
    {index: 6, label: "已删除", key: "6"},
    {index: 7, label: "未投放", key: "7"},
    {index: 8, label: "已关闭", key: "8"},
    {index: 9, label: "已完成", key: "9"},

    //tt 状态
    {index:10,label:"所有包含已删除",key:"AD_STATUS_ALL"},
    {index:11,label:"所有不含已删除",key:"AD_STATUS_NOT_DELETE"},
    {index:12,label:"推广系列已删除",key:"AD_STATUS_CAMPAIGN_DELETE"},
    {index:13,label:"广告组已删除",key:"AD_STATUS_ADGROUP_DELETE"},
    {index:14,label:"已删除",key:"AD_STATUS_DELETE"},
    {index:15,label:"账号审核拒绝",key:"AD_STATUS_ADVERTISER_AUDIT_DENY"},
    {index:16,label:"账号审核中",key:"AD_STATUS_ADVERTISER_AUDIT"},
    {index:17,label:"广告主合同未生效",key:"ADVERTISER_CONTRACT_PENDING"},
    {index:18,label:"广告主账号被惩罚",key:"ADVERTISER_ACCOUNT_PUNISH"},
    {index:19,label:"广告账号余额不足",key:"AD_STATUS_BALANCE_EXCEED"},
    {index:20,label:"推广系列超出预算",key:"AD_STATUS_CAMPAIGN_EXCEED"},
    {index:21,label:"广告组超出预算",key:"AD_STATUS_BUDGET_EXCEED"},
    {index:22,label:"审核中",key:"AD_STATUS_AUDIT"},
    {index:23,label:"修改审核中",key:"AD_STATUS_REAUDIT"},
    {index:24,label:"审核拒绝",key:"AD_STATUS_AUDIT_DENY"},
    {index:25,label:"广告组审核拒绝",key:"AD_STATUS_ADGROUP_AUDIT_DENY"},
    {index:26,label:"广告组部分审核中，且不在投放中",key:"AD_STATUS_ADGROUP_PARTIAL_AUDIT_NO_DELIVERY"},
    {index:27,label:"广告部分审核中，且在投放中",key:"AD_STATUS_PARTIAL_AUDIT_DELIVERY_OK"},
    {index:28,label:"广告部分审核中，且不在投放中",key:"AD_STATUS_PARTIAL_AUDIT_NO_DELIVERY"},
    {index:29,label:"待补充行业资质",key:"AD_STATUS_ADGROUP_INDUSTRY_QUALIFICATION_MISSING"},
    {index:30,label:"行业资质已过期",key:"AD_STATUS_ADGROUP_INDUSTRY_QUALIFICATION_EXPIRED"},
    {index:31,label:"行业资质不通过",key:"AD_STATUS_ADGROUP_INDUSTRY_QUALIFICATION_DENY"},
    {index:32,label:"待补充音乐资质",key:"AD_STATUS_MUSIC_AUTHORIZATION_MISSING"},
    {index:33,label:"广告绑定的Pixel已解绑",key:"AD_STAUS_PIXEL_UNBIND"},
    {index:34,label:"直播未开始",key:"AD_STATUS_LIVE_OFFLINE"},
    {index:35,label:"未到投放时间",key:"AD_STATUS_NOT_START"},
    {index:36,label:"已完成",key:"AD_STATUS_DONE"},
    {index:37,label:"推广系列暂停",key:"AD_STATUS_CAMPAIGN_DISABLE"},
    {index:38,label:"广告组暂停",key:"AD_STATUS_ADGROUP_DISABLE"},
    {index:39,label:"广告组被冻结",key:"ADGROUP_STATUS_FROZEN"},
    {index:40,label:"广告暂停",key:"AD_STATUS_DISABLE"},
    {index:41,label:"投放中",key:"AD_STATUS_DELIVERY_OK"},
    {index:42,label:"抽声进行中",key:"AD_STATUS_PROCESS_AUDIO"},
    {index:43,label:"R&F广告组已关闭",key:"AD_STATUS_RF_ADGROUP_CLOSED"},
    ]

return status;
}

// 行动引导文案
export  const getCallToActionList = ()=>{
  let callToAction = [
    {value: "APPLY_NOW", label: "立即申请"},
    {value: "BOOK_NOW", label: "立即预约"},
    {value: "CONTACT_US", label: "联系我们"},
    {value: "DOWNLOAD_NOW", label: "立即下载"},
    {value: "LEARN_MORE", label: "查看详情"},
    {value: "SHOP_NOW", label: "去逛逛"},
    {value: "SIGN_UP", label: "立即注册"},
    {value: "PLAY_GAME", label: "去玩游戏"},
    {value: "WATCH_NOW", label: "点击观看"},
    {value: "READ_MORE", label: "阅读更多"},
    {value: "VIEW_NOW", label: "立即查看"},
    {value: "GET_QUOTE", label: "查看价格"},
    {value: "ORDER_NOW", label: "立即下单"},
    {value: "INSTALL_NOW", label: "立即安装"},
    {value: "GET_SHOWTIMES", label: "查看演出时间"},
    {value: "LISTEN_NOW", label: "马上去听"},
    {value: "INTERESTED", label: "感兴趣"},
    {value: "SUBSCRIBE", label: "订阅"},
    {value: "GET_TICKETS_NOW", label: "获取门票"},
    {value: "EXPERIENCE_NOW", label: "立即体验"},
    {value: "PREORDER_NOW", label: "立即预定"},
    {value: "VISIT_STORE", label: "去附近商店看看"},
    // {value: "JOIN_THIS_HASHTAG", label: "加入挑战"},
    // {value: "VIEW_VIDEO_WITH_THIS_EFFECT", label: "查看贴纸视频"},
    // {value: "SHOOT_WITH_THIS_EFFECT", label: "立即开拍"},
  ];
  return callToAction;
}
//受众地区
export  const  getLocationList = ()=>{
  let locationList = [
    {label: "巴西", value: "3469034"},
    {label: "日本", value: "1861060"},
    {label: "印度", value: "1269750"},
    {label: "英国", value: "2635167"},
    {label: "德国", value: "2921044"},
    {label: "法国", value: "3017382"},
    {label: "意大利", value: "3175395"},
    {label: "西班牙", value: "2510769"},
    {label: "俄罗斯", value: "2017370"},
    {label: "芬兰", value: "660013"},
    {label: "瑞典", value: "2661886"},
    {label: "墨西哥", value: "3996063"},
    {label: "波兰", value: "798544"},
    {label: "阿根廷", value: "3865483"},
    {label: "加拿大", value: "6251999"},
    {label: "埃及", value: "357994"},
    {label: "荷兰", value: "2750405"},
    {label: "土耳其", value: "298795"},
    {label: "澳大利亚", value: "2077456"},
    {label: "哥伦比亚", value: "3686110"},
    {label: "沙特阿拉伯", value: "102358"},
    {label: "阿联酋", value: "290557"},
    {label: "南非", value: "953987"},
    {label: "阿尔及利亚", value: "2589581"},
    {label: "摩洛哥", value: "2542007"},
    {label: "科威特", value: "285570"},
    {label: "泰国", value: "1605651"},
    {label: "越南", value: "1562822"},
    {label: "韩国", value: "1835841"},
    {label: "印度尼西亚", value: "1643084"},
    {label: "中国台湾地区", value: "1668284"},
    {label: "菲律宾", value: "1694008"},
    {label: "马来西亚", value: "1733045"},
    {label: "中国香港", value: "1819730"},
    {label: "中国澳门", value: "1821275"},
    {label: "柬埔寨", value: "1831722"},
    {label: "新加坡", value: "1880251"},
    {label: "巴基斯坦", value: "1168579"},
    {label: "叙利亚", value: "163843"},
    {label: "百慕大", value: "3573345"},
    {label: "开曼群岛", value: "3580718"},
    {label: "圣皮埃尔和密克隆", value: "3424932"},
    {label: "格陵兰", value: "3425505"},
    {label: "特立尼达和多巴哥", value: "3573591"},
    {label: "圣卢西亚", value: "3576468"},
    {label: "安提瓜和巴布达", value: "3576396"},
    {label: "多米尼克", value: "3575830"},
    {label: "美属维尔京群岛", value: "4796775"},
    {label: "圣巴泰勒米", value: "3578476"},
    {label: "圣基茨和尼维斯", value: "3575174"},
    {label: "蒙塞拉特岛", value: "3578097"},
    {label: "伯利兹", value: "3582678"},
    {label: "瓜德罗普", value: "3579143"},
    {label: "海地", value: "3723988"},
    {label: "圣文森特和格林纳丁斯", value: "3577815"},
    {label: "荷兰加勒比区", value: "7626844"},
    {label: "巴哈马", value: "3572887"},
    {label: "安圭拉", value: "3573511"},
    {label: "牙买加", value: "3489940"},
    {label: "法属圣马丁", value: "3578421"},
    {label: "阿鲁巴", value: "3577279"},
    {label: "荷属圣马丁", value: "7609695"},
    {label: "特克斯和凯科斯群岛", value: "3576916"},
    {label: "格林纳达", value: "3580239"},
    {label: "巴巴多斯", value: "3374084"},
    {label: "马提尼克", value: "3570311"},
    {label: "英属维尔京群岛", value: "3577718"},
    {label: "库拉索", value: "7626836"},
    {label: "瑞士", value: "2658434"},
    {label: "卢森堡", value: "2960313"},
    {label: "列支敦士登", value: "3042058"},
    {label: "奥地利", value: "2782113"},
    {label: "捷克", value: "3077311"},
    {label: "斯洛伐克", value: "3057568"},
    {label: "斯洛文尼亚", value: "3190538"},
    {label: "克罗地亚", value: "3202326"},
    {label: "匈牙利", value: "719819"},
    {label: "保加利亚", value: "732800"},
    {label: "厄瓜多尔", value: "3658394"},
    {label: "智利", value: "3895114"},
    {label: "委内瑞拉", value: "3625428"},
    {label: "波多黎各", value: "4566966"},
    {label: "几内亚", value: "2420477"},
    {label: "洪都拉斯", value: "3608932"},
    {label: "危地马拉", value: "3595528"},
    {label: "玻利维亚", value: "3923057"},
    {label: "尼加拉瓜", value: "3617476"},
    {label: "萨尔瓦多", value: "3585968"},
    {label: "古巴", value: "3562981"},
    {label: "巴拉圭", value: "3437598"},
    {label: "秘鲁", value: "3932488"},
    {label: "哥斯达黎加", value: "3624060"},
    {label: "多米尼加", value: "3508796"},
    {label: "巴拿马", value: "3703430"},
    {label: "乌拉圭", value: "3439705"},
    {label: "格鲁吉亚", value: "614540"},
    {label: "以色列", value: "294640"},
    {label: "圣马力诺", value: "3168068"},
    {label: "马其顿", value: "718075"},
    {label: "泽西", value: "3042142"},
    {label: "马恩岛", value: "3042225"},
    {label: "黑山", value: "3194884"},
    {label: "根西", value: "3042362"},
    {label: "刚果（金)", value: "203312"},
    {label: "马耳他", value: "2562770"},
    {label: "阿尔巴尼亚", value: "783754"},
    {label: "拉脱维亚", value: "458258"},
    {label: "波斯尼亚和黑塞哥维那", value: "3277605"},
    {label: "安道尔", value: "3041565"},
    {label: "塞尔维亚", value: "6290252"},
    {label: "阿塞拜疆", value: "587116"},
    {label: "法罗群岛", value: "2622320"},
    {label: "直布罗陀", value: "2411586"},
    {label: "爱沙尼亚", value: "453733"},
    {label: "立陶宛", value: "597427"},
    {label: "斯瓦尔巴群岛和扬马延岛", value: "607072"},
    {label: "希腊", value: "390903"},
    {label: "爱尔兰", value: "2963597"},
    {label: "几内亚比绍", value: "2372248"},
    {label: "莫桑比克", value: "1036973"},
    {label: "赤道几内亚", value: "2309096"},
    {label: "安哥拉", value: "3351879"},
    {label: "佛得角", value: "3374766"},
    {label: "葡萄牙", value: "2264397"},
    {label: "圣多美和普林西比", value: "2410758"},
    {label: "斯里兰卡", value: "1227603"},
    {label: "孟加拉国", value: "1210997"},
    {label: "比利时", value: "2802361"},
    {label: "挪威", value: "3144096"},
    {label: "丹麦", value: "2623032"},
    {label: "冰岛", value: "2629691"},
    {label: "法属波利尼西亚", value: "4030656"},
    {label: "法属圭亚那", value: "3381670"},
    {label: "摩纳哥", value: "2993457"},
    {label: "法属南方和南极洲领地", value: "1546748"},
    {label: "乌兹别克斯坦", value: "1512440"},
    {label: "哈萨克斯坦", value: "1522867"},
    {label: "摩尔多瓦", value: "617790"},
    {label: "白罗斯", value: "630336"},
    {label: "乌克兰", value: "690791"},
    {label: "突尼斯", value: "2464461"},
    {label: "黎巴嫩", value: "272103"},
    {label: "吉布提", value: "223816"},
    {label: "阿曼", value: "286963"},
    {label: "伊拉克", value: "99237"},
    {label: "毛里塔尼亚", value: "2378080"},
    {label: "利比亚", value: "2215636"},
    {label: "乍得", value: "2434508"},
    {label: "也门", value: "69543"},
    {label: "卡塔尔", value: "289688"},
    {label: "科摩罗", value: "921929"},
    {label: "厄立特里亚", value: "338010"},
    {label: "约旦", value: "248816"},
    {label: "巴林", value: "290291"},
    {label: "苏丹", value: "366755"},
    {label: "索马里", value: "51537"},
    {label: "南苏丹", value: "7909807"},
    {label: "巴勒斯坦", value: "6254930"},
    {label: "罗马尼亚", value: "798549"},
    {label: "尼日利亚", value: "2328926"},
    {label: "肯尼亚", value: "192950"},
    {label: "新西兰", value: "2186224"},
    {label: "缅甸", value: "1327865"},
    {label: "美国", value: "6252001"},
  ]

  return locationList;
}
//受众语言
export const getLanguagesList = ()=>{
  let languagesList = [
    {value: "ar", label: "阿拉伯语"},
    {value: "as", label: "阿萨姆语"},
    {value: "bgc", label: "哈里亚纳语"},
    {value: "bh", label: "比哈尔语"},
    {value: "bn", label: "孟加拉语"},
    {value: "cs", label: "捷克语"},
    {value: "de", label: "德语"},
    {value: "el", label: "希腊语"},
    {value: "en", label: "英语"},
    {value: "es", label: "西班牙语"},
    {value: "fi", label: "芬兰语"},
    {value: "fr", label: "法语"},
    {value: "gu", label: "古吉拉特语"},
    {value: "he", label: "希伯来语"},
    {value: "hi", label: "印地语"},
    {value: "hu", label: "匈牙利语"},
    {value: "id", label: "印尼语"},
    {value: "it", label: "意大利语"},
    {value: "ja", label: "日语"},
    {value: "kn", label: "卡纳达语"},
    {value: "ko", label: "韩语"},
    {value: "ml", label: "马拉雅拉姆语"},
    {value: "mr", label: "马拉地语"},
    {value: "ms", label: "马来语"},
    {value: "nl", label: "荷兰语"},
    {value: "or", label: "奥里亚语"},
    {value: "pa", label: "旁遮普语"},
    {value: "pl", label: "波兰语"},
    {value: "pt", label: "葡萄牙语"},
    {value: "raj", label: "拉贾斯坦语"},
    {value: "ro", label: "罗马尼亚语"},
    {value: "ru", label: "俄语"},
    {value: "sv", label: "瑞典语"},
    {value: "ta", label: "泰米尔语"},
    {value: "te", label: "泰卢固语"},
    {value: "th", label: "泰语"},
    {value: "tr", label: "土耳其语"},
    {value: "uk", label: "乌克兰语"},
    {value: "vi", label: "越南语"},
    {value: "zh-Hant", label: "繁体中文"}]
  return languagesList;
}


